package com.cbh.feign.controller.quote;



import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.quote.CBH_CarInsurance;
import com.cbh.api.model.quote.CBH_OfferPolicy;


public interface OfferControllerBase {

	@RequestMapping(value = "/sign/v3/offer/vehicle/comId", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> offerVehicleByComId(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "vehId", required = true) String vehId,
			@RequestParam(value = "comId", required = true) String comId,
			@RequestBody(required = true) List<CBH_CarInsurance> cis);

	@RequestMapping(value = "/sign/v3/offer/vehicle", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> offerVehicle(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "vehId", required = true) String vehId,
			@RequestBody(required = true) List<CBH_CarInsurance> cis
	);

	@RequestMapping(value = "/sign/v3/offer/vcrid", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<CBH_OfferPolicy> vcrid(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "vcrId", required = true) String vcrId,
			@RequestBody(required = true) List<CBH_CarInsurance> cis);

	@RequestMapping(value = "/sign/v3/offer/opId", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<CBH_OfferPolicy> offerByOpId(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "opId", required = true) String opId,
			@RequestParam(value = "engineNo", required = true) String engineNo);

	@RequestMapping(value = "/sign/v3/offer/qiId", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<CBH_OfferPolicy> offer(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "qiId", required = true) String qiId,
			@RequestParam(value = "engineNo", required = true) String engineNo);

	@RequestMapping(value = "/sign/v3/offer/{userId}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<CBH_OfferPolicy>> getByUserId(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable(value = "userId", required = true) String userId);

	@RequestMapping(value = "/sign/v3/offer/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<CBH_OfferPolicy> getById(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "opid", required = true) String opid);

	@RequestMapping(value = "/sign/v3/offer/qi/{opid}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<CBH_OfferPolicy> getByIdAndQi(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable(value = "opid", required = true) String opid);

	@RequestMapping(value = "/sign/v3/offer/insurance/{opId}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<CBH_CarInsurance>> getByOpId(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@PathVariable(value = "opid", required = true) String opId);

	/**
	 * 报价
	 * 
	 * @param userId
	 * @param VehicleInformationId
	 * @param price
	 * @param cis
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/offer", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> offer(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "VehicleInformationId", required = true) String VehicleInformationId,
			@RequestBody(required = true) List<CBH_CarInsurance> cis);

}
